package com.hygj.sitemesh;

import org.sitemesh.builder.SiteMeshFilterBuilder;
import org.sitemesh.config.ConfigurableSiteMeshFilter;
/**
 * 网页布局和修饰的框架
 * @author Administrator
 *
 */
public class MySiteMeshFilter extends ConfigurableSiteMeshFilter {
    //路径    ,‘/’ 拦截所有路径
	String adminPath = "/";
	//模板
	private String template = "";

	@Override
	protected void applyCustomConfiguration(SiteMeshFilterBuilder builder) {

		builder
				// 后台
				.addDecoratorPath(adminPath + "*", template + "/admin.jsp")
				.addExcludedPath("/checkLogin")	//除去checkLogin
				.addExcludedPath("/logout")//除去logout
				.addExcludedPath("/login.jsp");//除去login.jsp
	}

}
